package com.jiyun.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat")
@ApiModel(value="chat聊天", description="司机用户聊天表")
public class Chat  implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "消息ID")
    private int id;

    @ApiModelProperty(value = "发送者")
    private String sender;

    @ApiModelProperty(value = "消息内容")
    private String content;

    @ApiModelProperty(value = "消息时间", example = "2023-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date time;

    @ApiModelProperty(value = "用户ID")
    private int userId;

    @ApiModelProperty(value = "司机ID")
    private int driverId;

//    @ApiModelProperty(value = "司机回复内容")
//    private String driverText;

    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String driverName;

}
